#
from typing import Dict
import numpy as np
import torch

class BfoConfig(object):
    def __init__(self):
        self.name = 'apps.wfs.bfo_config.BfoConfig'
    
    device = 'cuda' if torch.cuda.is_available() else 'cpu'
    N = 8 # 天线数量
    f = 2.4E9 # 频率
    c = 3E8
    lambda_ = c / f # 波长
    d = np.array([lambda_/2.0]) * np.ones([N, 1]) # 天线距离（半波长）
    n = np.arange(0, N, 1).reshape([-1, 1]) # 天线索引号
    # 波束形成
    theta_min, theta_max, theta_step = -90, 90, 0.1
    thetas = np.arange(theta_min, theta_max, theta_step).reshape([1, -1])
    theta = 0.0 # 扫描角度
    thetas_rad = thetas / 180 * np.pi
    theta_rad = theta / 180 * np.pi
    #
    SSL_db = -30 # 旁瓣水平，单位：dB
    SSL = 10 ** (SSL_db / 10)